function [ map ] = colourWheel(N)
    % Generates an RGB colour wheel mapap - mapin and mapax mapatch
    n3 = round(N/3);
    map = zeros(N,3);
    for i = 0:(n3-1)
        map(i+1,1) = 1-i/n3;
        map(i+1,2) = i/n3;
    end
    for i = 0:(n3-1);
        map(i+n3+1,2) = 1-i/n3;
        map(i+n3+1,3) = i/n3;
    end
    diff = N - (2*n3);
    for i = 0:(diff-1);
        map(i+2*n3+1,3) = 1-i/diff;
        map(i+2*n3+1,1) = i/diff;
    end
end

